package qvanguoobject.test02;

public class Person {
    // 私有属性：姓名和年龄
    private String name;
    private int age;

    // 构造方法，用于初始化数据成员
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    // 显示方法，打印姓名和年龄
    public void display() {
        System.out.println("姓名: " + name);
        System.out.println("年龄: " + age);
    }
}
